############################################################
# The CMakeLists.txt for the ETF's G4 simulation project
# Created: Sun Yazhou, Nov. 6, 2023
# Last modified: Sun Yazhou, Nov.6, 2023
#
# \copyright Copyright (c) 2023-2024 IMP-CAS with LGPLv3 LICENSE
#############################################################

set(target EG4Sim)

file(GLOB_RECURSE LIBSRCS *.cxx)
add_library(${target} SHARED ${LIBSRCS})

target_include_directories(${target} PUBLIC ${ROOT_INCLUDE_DIRS} ${Geant4_INCLUDE_DIRS})
target_include_directories(${target} PUBLIC action PUBLIC det PUBLIC sdhit)
target_link_libraries(${target} PUBLIC ${Geant4_LIBRARIES} PUBLIC ${ROOT_LIBRARIES}
  PUBLIC yaml-cpp)

# register the relevant classes to root-dictionary
eg4_change_ext(.cxx .h FILES "${LIBSRCS}" OUTVAR headers)
eg4_rootGen(${target} HEADERS ${headers} LINKDEF simLinkDef.h)
